﻿@{
    Layout = null;
}

                      
@model ElingOA6_Admin_DSJCJ.Model.WorkTime

<!DOCTYPE html>
<html>
<head>
    @if (false)
    {
        <script src="../../../../Scripts/jquery-vsdoc.js" type="text/javascript"></script>
        <script src="../../../../Scripts/ASPxScriptIntelliSense.js" type="text/javascript"></script>
    }
    <link href="@Url.Content("~/Content/Site.css", true)" rel="stylesheet" type="text/css" />

    <script src="@Url.Content("~/Scripts/jquery.min.js", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Common/GetRootPath.ashx", true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Scripts/FloatDiv.js", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/regex.js", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/PageCommon.js", true)" type="text/javascript"></script>

    @Html.DevExpress().GetStyleSheets(
        new StyleSheet { ExtensionType = ExtensionType.ListBox }
    )
    @Html.DevExpress().GetScripts(
         new Script { ExtensionType = ExtensionType.ListBox }
    )
        @Html.DevExpress().GetStyleSheets(

        new StyleSheet { ExtensionType = ExtensionType.ListBox, Theme = DevExpressHelper.Theme },
        new StyleSheet { ExtensionType = ExtensionType.GridView, Theme = DevExpressHelper.Theme }
)


<script>

    $(document).ready(function () {
        var hdjsAlert = $("#hdjsAlert").val();
        if (hdjsAlert == "OK") {
            alert("操作成功");
            parent.window.location.href = rootPath + "/Admin/WorkTime";
        }
        else if (hdjsAlert == "error") {
            alert("操作失败");
        }
        else {
            if (hdjsAlert != "") {
                alert(hdjsAlert);
            }
        }

    });

    function OK() {
        var BeginDate = FBeginDate.GetText();
        if (BeginDate == "") {
            alert("开始时间不可为空");
            return;
        }

        var EndDate = FEndDate.GetText();
        if (EndDate == "") {
            alert("结束时间不可为空");
            return;
        }

        form1.submit();
    }


</script>
</head>

<body>
    @using (Html.BeginForm("Save", "WorkTime", FormMethod.Post, new { id = "form1", @class = "tableFrom" }))
    {
    <table class="tableForm">
             <tr>
                <th>
                    开始日期：</th>
                <td class="tdClass">
                @Html.DevExpress().DateEdit(settings =>
                {
                    settings.Name = "FBeginDate";
                    settings.Date = Model.FBeginDate;
                    settings.Width = 500;

                }).GetHtml()
                </td>
            </tr>

            <tr>
                <th>
                    结束日期：</th>
                <td class="tdClass">
              @Html.DevExpress().DateEdit(settings =>
                {
                    settings.Name = "FEndDate";
                    settings.Date = Model.FEndDate;
                    settings.Width = 500;

                }).GetHtml()
                </td>
            </tr>
            <tr>
                <th>
                    上午上班时间：</th> 
                <td class="tdClass">
                    @Html.DevExpress().TimeEdit(settings =>
                    {
                        settings.Name = "FAMBeginTime";
                        settings.Width = 500;
                        settings.DateTime = Model.FAMBeginTime;
                    }).GetHtml()
                    </td>

</tr>
            <tr>
            <th>上午下班时间：</th>
                <td  class="tdClass">
                               @Html.DevExpress().TimeEdit(settings =>
                               {
                                   settings.Name = "FAMEndTime";
                                   settings.Width = 500;
                                   settings.DateTime = Model.FAMEndTime;
                               }).GetHtml()</td>
            </tr>
            <tr>
                <th>
                    下午上班时间：</th>
                <td class="tdClass">
     @Html.DevExpress().TimeEdit(settings =>
                               {
                                   settings.Name = "FPMBeginTime";
                                   settings.Width = 500;
                                   settings.DateTime = Model.FPMBeginTime;
                               }).GetHtml()
                 </td>
              </tr>
              <tr>
                <th>
                    下午下班时间：</th>
                <td class="tdClass">
            @Html.DevExpress().TimeEdit(settings =>
                               {
                                   settings.Name = "FPMEndTime";
                                   settings.Width = 500;
                                   settings.DateTime = Model.FPMEndTime;
                               }).GetHtml()
                    
                </td>
                </tr>
                <tr>
                <th>
                    上午考勤时间：</th>
                <td class="tdClass">
            @Html.DevExpress().TimeEdit(settings =>
                               {
                                   settings.Name = "FAMAttendanceTime";
                                   settings.Width = 500;
                                   settings.DateTime = Model.FAMAttendanceTime;
                                   settings.Properties.NullDisplayText = "";
                                   
                               }).GetHtml()
                    
                </td>
                </tr>
                <tr>
                <th>
                    下午考勤时间：</th>
                <td class="tdClass">
            @Html.DevExpress().TimeEdit(settings =>
                               {
                                   settings.Name = "FPMAttendanceTime";
                                   settings.Width = 500;
                                   settings.DateTime = Model.FPMAttendanceTime;
                                   settings.Properties.NullDisplayText = "";
                               }).GetHtml()
                    
                </td>
                </tr>
                

    </table>
        
        @Html.Hidden("hdMethod", ViewData["hdMethod"]);
        @Html.Hidden("hdjsAlert", (ViewData["jsAlert"]));                                             
        @Html.Hidden("FWorkTimeID", (ViewData["FWorkTimeID"]));  
    }

</body>
</html>
